let includes = ([
    "include/common.js",
]);


//敌对的人 敌对的人 但不一定是正在追杀我的人
let enemy = [];
//正在杀我的人
let pub = {
    killers : [],
}


function killOb(ob) {
    if (userp(thisObject)) {
        tellObject(thisObject, `杀${ob.get("name")}`)
    }
    if (!pub.killers.includes(ob.get("id"))) {
        thisObject.addKiller(ob);
    }
}


function getKillers() {
    return pub.killers;
}

function addKiller(ob) {
    pub.killers.push(fileNameSid(ob));
}


//心跳中呼叫这个函数
function attack() {
    let me = thisObject;
    if (pub.killers.length > 0) {
        let obId = getRandomOneOfArr(pub.killers);
        let ob = loadObject(obId, 1);
        if (userp(thisObject)) {
            tellObject(thisObject, `你正在和${ob.get("name")}肉搏中.....`).to();
        }
    }

}